package crawler;

import java.util.Vector;

public class CrawlerManager {
	
	Vector<Thread> crawlerList;
	
	public CrawlerManager() {
		crawlerList = new Vector<Thread>(2,1);
	}
	
	public void add(Crawler _crawler) {
		crawlerList.add(new Thread(_crawler, String.valueOf(crawlerList.size())));
	}
	
	public void start() {
		for (int i=0; i<crawlerList.size(); i++) {
//			System.out.println("Lanzando proceso " + i);
			crawlerList.elementAt(i).start();
//			System.out.println("Proceso " + i + " lanzado");
			
		}
	}

}
